<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        body {
            margin: 0;
            padding: 0;
            background: url("./resouces/static/桂林阳朔漓江山水日落风光4k壁纸_彼岸图网.jpg");
            background-size: cover;
        }

        .mainDiv {
            width: 1278px;
            height: 709px;
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%)
        }

        .box {
            position: relative;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 500px;
            padding: 40px;
            box-sizing: border-box;
            background-color: darkblue;
            background: rgba(0, 0, 0, .6);
            border-radius: 10px;
        }

        .box h2 {
            color: blanchedalmond;
            letter-spacing: 10px;
            text-align: center;
        }

        .box .inputBox {
            position: relative;
        }

        .box .inputBox input {
            width: 100%;
            padding: 10px 0;
            font-size: 16px;
            color: #ffffff;
            margin-bottom: 30px;
            border: none;
            border-bottom: 1px solid grey;
            outline: none;
            background: transparent;
            letter-spacing: 1px;
        }

        .box .inputBox label {
            position: absolute;
            top: 0;
            left: 0;
            padding: 10px 0;
            font-size: 14px;
            color: gray;
            pointer-events: none;
            transition: .5s;
        }

        .box .inputBox input:focus ~ label,
        .box .inputBox input:valid ~ label {
            top: -25px;
            left: 0;
            color: #03a9f4;
            font-size: 12px;
        }

        .box input[type="submit"] {
            background: transparent;
            border: none;
            outline: none;
            color: #fff;
            background: darkorange;
            padding: 10px 20px;
            cursor: pointer;
            border-radius: 8px;
            width: 100%;
        }
    </style>
    <script>
        function submit() {
            let pwd = document.getElementById("pwd");
            let userName = document.getElementById("userName");
            if (pwd.value === '123456' && userName.value === 'lds') {
                alert("login success")
            } else {
                alert("login failed")
            }
        }
    </script>
</head>
<body>

<div class="mainDiv">
    <div class="box">
        <h2>无情世界登录窗口</h2>
        <form action="">
            <div class="inputBox">
                <input type="text" required="required" id="userName"/>
                <label>请输入用户名</label>
            </div>
            <div class="inputBox">
                <input type="password" required="required" id="pwd"/>
                <label>请输入密码</label>
            </div>
            <input type="submit" value="登录" onclick="submit">
        </form>
    </div>
</div>
</body>
</html>
